package com.itlao5.budtrip;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;

import butterknife.ButterKnife;

/**
 * Activity基类
 * Created by Administrator on 2018/3/20.
 */
public abstract class BaseActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(getLayoutResId());
        ButterKnife.bind(this);
        initData(savedInstanceState);
        initView(savedInstanceState);
        setListener();
    }

    abstract int getLayoutResId();

    abstract void initData(Bundle savedInstanceState);

    abstract void initView(Bundle savedInstanceState);

    abstract void setListener();
}
